﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;

namespace AspNetCs.IDAL
{
    public interface IPager
    {

        /// <summary>
        /// 针对单表分页控件绑定
        /// </summary>
        /// <param name="obj">控件对象</param>
        /// <param name="TableName">需要绑定的表名</param>
        /// <param name="ReColumns">返回的列名,*=所有字段</param>
        /// <param name="orderFld">排序字段</param>
        /// <param name="PageIndex">当前页</param>
        /// <param name="PageSize">分页条数</param>
        /// <param name="OrderType">排序类型,   非   asc   值则降序</param>
        /// <param name="WhereStr"> 查询条件   (注意:   不要加   where)  </param>
        /// <param name="ident">表的唯一主键字段(为空则会调用排序字段的列名)</param>
        void ControlBind(Control obj, String TableName, string ReColumns, string orderFld, int PageIndex, int PageSize, string OrderType, string WhereStr, string ident);

        /// <summary>
        /// 返回表对象的数据集条数
        /// </summary>
        /// <param name="obj">控件对象</param>
        /// <param name="TableName">需要绑定的表名</param>
        /// <param name="ReColumns">返回的列名,*=所有字段</param>
        /// <param name="orderFld">排序字段</param>
        /// <param name="PageIndex">当前页</param>
        /// <param name="PageSize">分页条数</param>
        /// <param name="OrderType">排序类型,   非   asc   值则降序</param>
        /// <param name="WhereStr"> 查询条件   (注意:   不要加   where)  </param>
        /// <param name="ident">表的唯一主键字段(为空则会调用排序字段的列名)</param>
        /// <returns></returns>
        int ReCount(Control obj, String TableName, string ReColumns, string orderFld, int PageIndex, int PageSize, string OrderType, string WhereStr, string ident);
    }
}
